
package za.ac.cput.peterjohn.DesignPatternPrincipals.Behavioral.Template.Factory;

import za.ac.cput.peterjohn.DesignPatternPrincipals.Behavioral.Template.Model.Meal;
import za.ac.cput.peterjohn.DesignPatternPrincipals.Behavioral.Template.Model.Hamburger;
import za.ac.cput.peterjohn.DesignPatternPrincipals.Behavioral.Template.Model.CheeseBurger;

public class MealFactory
{
    private static Meal meal = null;

    public static Meal createHamburger() 
    {
        if(meal == null)
            meal = new Hamburger();
        
        return meal;
    }

    public static Meal createCheeseBurger() 
    {
        if (meal == null)
            meal = new CheeseBurger();
        
        return meal;
    }
}
